<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<script type="text/javascript">
function nume()
{
    var idPrim=document.getElementById("idPrim");
	if(idPrim!=null)
	{
		var copii=idPrim.childNodes;
		for (var i=0; i<copii.length; i++ )
		{
			var copil = copii[i];
			if(!(copil instanceof Text))
			{
				var subcopii = copil.childNodes;
				for (var e=0; e<subcopii.length; e++)
				{ 
					var subcopil = subcopii[e];
					if(!(subcopil instanceof Text))
					{
						if(! isNaN (parseInt(subcopil.innerHTML)))
						{
			   			alert(subcopil.innerHTML);
						}
					}
				}
			}		
		}
	}
}
</script>
</head>
<body onload="nume()">
<div id="idPrim">
	<div>
		<span>5668516</span>
		<span>lalalsa</span>
		<span>4455454</span>
	</div>
	<div>
		<span>16516</span>
		<span>"document"</span>
		<span>o mie 300</span>
	</div>
	<div>
		<span>height</span>
		<span>xxx</span>
		<span>25848</span>
	</div>

</div>
</body>
</html>1